#include "staticgesturedialog.h"
#include "ui_staticgesturedialog.h"
#include <QFileDialog>

StaticGestureDialog::StaticGestureDialog(QWidget *parent) :
    QDialog(parent),
    ui_(new Ui::StaticGestureDialog)
{
    ui_->setupUi(this);
	connect(ui_->captureButton, SIGNAL(clicked()), this, SIGNAL(capture()));
	connect(ui_->pathButton, SIGNAL(clicked()), this, SLOT(editPath()));
}

StaticGestureDialog::~StaticGestureDialog()
{
    delete ui_;
}

QString StaticGestureDialog::getGesture() const {
	return ui_->gestureEdit->text();
}

QString StaticGestureDialog::getPath() const {
	return ui_->pathEdit->text();
}

void StaticGestureDialog::editPath() {
	QString dir = QFileDialog::getExistingDirectory(this, tr("Ściżka zapsu gestów"), QDir::currentPath());
	if (!dir.isNull())
		ui_->pathEdit->setText(dir);
}
